﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Web.Profile;

namespace WebSite.cn
{
    public partial class pinpai : System.Web.UI.UserControl
    {
        // Fields
        public string isshow = "";
        public string pinmsg = "";

        // Methods
        protected void Page_Load(object sender, EventArgs e)
        {

                DataTable table;
              
                    string sql = "select pinpaiid,pinpainame,pinpailogo from DB_Pinpai where visible=1 order by pinpaiorder";
                    table = SQLAccess.GreatDs(sql).Tables[0];
                    if (table.Rows.Count > 0)
                    {
                        foreach (DataRow row2 in table.Rows)
                        {
                            string str3 = this.pinmsg;
                            if (Request.QueryString["pinid"] == row2["pinpaiid"].ToString())
                            {
                                this.pinmsg = str3 + "<li class='currentBrand'><img  src='../../uploadfile/brand/" + row2["pinpailogo"].ToString() + "' width='60px' height='40px'  alt=''/> &nbsp;&nbsp;<a  href='hotpro.aspx?sid=5&pinid=" + row2["pinpaiid"].ToString() + "'>" + row2["pinpainame"].ToString() + "</a></li>";
                            }
                            else
                            {
                                this.pinmsg = str3 + "<li><img  src='../../uploadfile/brand/" + row2["pinpailogo"].ToString() + "' width='60px' height='40px'  alt=''/> &nbsp;&nbsp;<a  href='hotpro.aspx?sid=5&pinid=" + row2["pinpaiid"].ToString() + "'>" + row2["pinpainame"].ToString() + "</a></li>";
                            }
                        }
                    }
                    else
                    {
                        this.isshow = "none";
                    }
                }
            //}


    }
}